package routers

import (
	"Sales_system/kua_yu"
	"github.com/gin-gonic/gin"
)

func sysNocheckrouter(r *gin.RouterGroup){
	r = r.Group("/apis")
	orderRouter(r)
	detailsRouter(r)
	consumerRouter(r)
	goodsRouter(r)
	classRouter(r)
	factoryRouter(r)
	getbill(r)
}

func InitRouter() *gin.Engine {
	r := gin.New()
	r.Use(gin.Logger())
	r.Use(gin.Recovery())
	r.Use(kua_yu.Cors())
	g := r.Group("/system")

	sysNocheckrouter(g)

	return r
}